package emP;
public class Salesman extends Employee {
    private double baseSalary;
    private double salesAmount;
    public Salesman(String name, int age, String id, double baseSalary, double salesAmount) {
        super(name, age, id);
        this.baseSalary = baseSalary;
        this.salesAmount = salesAmount;
        this.wage = baseSalary + salesAmount * 0.1;
    }
    public void salary() {
        System.out.println("销售员工资: " + this.wage + "元");
    }
    public String toString() {
        return "Salesman{" + super.toString() + ", baseSalary=" + baseSalary + ", salesAmount=" + salesAmount + "}";
    }
}